<?php
require_once('inc/init.php');
$db->row_delete("online","userid={$lg['userid']} or ip='".getIP()."'");
$t= -86400 * 365 * 2;
$_SESSION['userid'] = '';
$_SESSION['groupid'] = '';
$_SESSION['isadmin'] = '';
session_destroy();
setCookies('username', '', $t);
setCookies('userpass', '', $t);
setCookies('expire', '', $t);
printMsg('logout_succeed');
?>